<div id="div_qsh" class="left" style="width:510px">
  <div id="div_qi">
    <div class="frame">
      <div class="area">
        <div class="left" style="width:100px;height:18px">
          <% @question.last_question do |q| %>
            <%= link_to '前一题', q %>
          <% end %>
        </div>
        <div class="right" style="text-align:right;width:100px;height:18px">
          <% @question.next_question do |q| %>
            <%= link_to '后一题', q %>
          <% end %>
        </div>
        <h4 class="middle"><%= link_to @question.question_list.name, @question.question_list %>（<%= @question.position %>/<%= @question.question_list.questions.count %>）</h4>
      </div>
    </div>

    <div class="question-list-item">
      <div class="question-list-item-title">
        <div class="left">
          <h4><%= @question.current_version.question_type.name %></h4>
        </div>
      </div>
      <div class="question-list-item-content">
        <%= render @question.current_version %>
      </div>
      <div class="question-list-item-meta">
        <div class="left">
          <ul class="inline-list">
            <li>
              <%= author_name @question.current_version %>
            </li>
            <li>
              <%= time_text @question.current_version.created_at %>
            </li>
          </ul>
        </div>
        <div class="clear"></div>
      </div>
    </div>


  </div>

  <div id="div_lqvsh">
    <% if @question.question_versions.history.sort.tap do |h| %>
      <% if !h.empty? %><p>历史版本：</p><% end %>
    <% end.each do |question_version| %>

      <div class="question-list-item">
        <div class="question-list-item-title">
          <div class="left">
            <h4><%= question_version.question_type.name %></h4>
          </div>
          <div class="right">
            <%= time_text question_version.created_at %>
          </div>
        </div>
        <div class="question-list-item-content">
          <%= render question_version %>
        </div>
        <div class="question-list-item-meta">
          <div class="left">
            <ul class="inline-list">
              <li>
                <%= author_name question_version %>
              </li>
            </ul>
          </div>
          <div class="clear"></div>
        </div>
      </div>


    <% end.empty? %>
      无历史版本
    <% end %>
  </div>

  <% if @question.removed_at.nil? %>
    <p>评论</p>
    <%= render @question.topic %>
  <% else %>
    <p>题目于
      <%= @question.removed_at.localtime.to_s(:db) %>
      被<%= User.find(@question.removed_by).name %>废弃</p>
  <% end %>

</div>
<div class="right frame" style="width:220px">
  <div class="area">
    <%= author_name @question.question_list %><br/>
    最新版本（<%= author_name @question.current_version %>）
  </div>
</div>